<?php
    $name = 'upload/'. time().'.jpg';
    move_uploaded_file($_FILES['file']['tmp_name'], $name);    
    $ary = array();
    $ary['img'] = '/plugin/cooperation_unit/comment/plugin/twitter/'. $name;
    $ary['name'] = substr($_FILES['file']['name'], 0, stripos($_FILES['file']['name'], '.'));
    echo json_encode($ary);
?>
